package com.wn32.main.demo20;

import java.math.BigDecimal;

public class Main1 {
    public static void main(String[] args) {
        float Max = 40, Min = 10;
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < 365; i++) {
            BigDecimal bd = new BigDecimal(Math.random() * (Max - Min) + Min);
            System.out.println(bd.setScale(2, BigDecimal.ROUND_HALF_UP));// 保留2位小数并四舍五入
            builder.append(bd.setScale(2, BigDecimal.ROUND_HALF_UP)+",");
        }
        String s = builder.substring(0, builder.length() - 1);
        System.out.println(s);
    }
}
